﻿using System;
using System.Collections.Generic;
using System.Text;
using SagaDB.Actors;

using SagaMap.Tasks;

namespace SagaMap.Skills.SkillTypes
{
    public static class Prospect
    {
        const SkillIDs baseID = SkillIDs.Prospect;
        public static void Proc(ref Actor sActor, ref Actor dActor, ref Map.SkillArgs args)
        {/*
            byte level;

            ActorPC pc = (ActorPC)sActor;
            ActorEventHandlers.PC_EventHandler eh = (ActorEventHandlers.PC_EventHandler)pc.e;
            Tasks.PassiveSkillStatus ss;
            level = (byte)(args.skillID - baseID + 1);

            args.damage = 0;
            args.isCritical = Map.SkillArgs.AttackResult.Nodamage;
            if (dActor.type == ActorType.PC)
            {
                ActorPC targetpc = (ActorPC)dActor;

                if (targetpc.Tasks.ContainsKey("Prospect"))
                {
                    ss = (PassiveSkillStatus)targetpc.Tasks["Prospect"];
                    targetpc.BattleStatus.fleebonus -= (targetpc.intel * 2) + (level * 10);

                    if (dActor.type == ActorType.PC)
                    {
                        eh = (ActorEventHandlers.PC_EventHandler)dActor.e;
                        eh.C.SendBattleStatus();
                    }
                }
                else
                {
                    ss = new PassiveSkillStatus(level);
                    ss.client = dActor;
                    targetpc.Tasks.Add("Prospect", ss);

                    targetpc.BattleStatus.fleebonus += (targetpc.intel * 2) + (level * 10);

                    if (dActor.type == ActorType.PC)
                    {
                        eh = (ActorEventHandlers.PC_EventHandler)dActor.e;
                        eh.C.SendBattleStatus();
                    }
                }
            }
        }

        private static void Deactivate(Actor actor, ref Actor dActor, byte level)
        {
            ActorPC targetpc = (ActorPC)dActor;
            Tasks.PassiveSkillStatus ss;
            ss = (PassiveSkillStatus)actor.Tasks["Prospect"];

            actor.BattleStatus.fleebonus -= (targetpc.intel * 2) + (level * 10);
*/
        }

    }


}
